package com.atguigu.educms.controller;


import com.atguigu.common.R;
import com.atguigu.educms.entity.QaQt;
import com.atguigu.educms.service.QaQtService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Panghl
 * @since 2021-03-14
 */
@RestController
@RequestMapping("/educms/qa-qt")
public class QaQtController {

    @Autowired
    private QaQtService qtService;

    @GetMapping("/getQtList")
    @ApiOperation(value = "获取所有问题类型")
    public R getQtList(){
        return R.ok().data("typeList",qtService.list(null));
    }

}
